package com.yuke.cloud.service.smc.service;

import com.yuke.cloud.common.core.support.IService;
import com.yuke.cloud.service.api.smc.dto.GoodsAndSpecInfoDto;
import com.yuke.cloud.service.api.smc.dto.ShopCartInfoDto;
import com.yuke.cloud.service.api.smc.dto.ShopInfoDto;
import com.yuke.cloud.service.smc.dto.ShopDto;
import com.yuke.cloud.service.smc.dto.StoreShopDto;
import com.yuke.cloud.service.smc.entity.ExcelObject;
import com.yuke.cloud.service.smc.entity.Shop;

import java.util.List;


/**
 * Created by wg on 2018/09/07.
 */

public interface ShopService extends IService<Shop> {
    List<ShopDto> findShopsBySpecIds(List<Long> specIds);
    List<ShopDto> findNearShops(String longitude, String latitude,Integer deliverDistance);
    List<ShopDto> findNearShopsBySpecIds(List<Long> specIds, String longitude, String latitude,Integer deliverDistance);
    List<ShopDto> findShopsBySpecIdsAndDis(List<Long> specIds, String longitude, String latitude);
    ShopDto getShopDtoByShopId(Long shopId);
//    Map<Long, List<ShopDto>> findByIds(List<Long> shopIds);
    List<ShopDto> findByIds(List<Long> shopIds);
    List<Shop> getListDetailByCondition(ShopDto shopDto);
    List<Shop> getListByCondition(Shop shop);

    //api
    List<ShopCartInfoDto> getShopCartInfoDto(List<GoodsAndSpecInfoDto> goodsAndSpecInfoDtos);
    List<ShopInfoDto> getShopInfoByShopIds(List<Long> shopIds);
    List<ShopInfoDto> getShopAccountByShopIds(List<Long> shopIds);
    List<ShopInfoDto> getShopUserIdByShopIds(List<Long> shopIds);
    ShopInfoDto getShopInfoByShopId(Long shopId);
    List<ShopInfoDto> getAllShopInfo();

    List<ShopDto> findNearShopsAndReferenceShop(String longitude, String latitude, Integer deliverDistance, Long userId);
    List<ShopDto> findNearSelfShops(String longitude, String latitude, Integer deliverDistance);
    ShopInfoDto getShopByFactoryId(Long factoryId);



    List<ShopInfoDto> getShopIdsByCondition(Shop shop);
    List<ShopInfoDto> getShopInfoDtoByUserId(Long userId);

    List<ShopInfoDto> getShopInfoByShopName(String ShopName);
    List<ShopInfoDto> getShopInfoByGroupId(Long groupId);
    List<ShopInfoDto> getShopInfoDtoByUserIdList(List<Long> userIds);

    Integer saveShop(ShopInfoDto record);
    Integer insertShop(Shop shop);

    Long saveStore(Shop shop);

    void getShopIdToStore(Shop shop);

    List<StoreShopDto> findShopByStore(List<Long> storeIdList);

    List<ShopInfoDto> findShopNameByShopIds(List<Long> shopIds);

    List<ShopDto> findNearShopTeam(String longitude, String latitude,Integer deliverDistance);

    List<ShopDto> findUsedShopTeam(Long userId);

    /**
     *  导出2天内未下单加盟的店铺
     * @return
     */
    List<ExcelObject> joinExcel();

    /**
     * 导出 2天未下单的 活跃店铺
     * @return
     */
    List<ExcelObject> activeShops();
}
